/**
 * @file : TimeIntegratorFactory.cpp
 * @author: fenghuwuyu
 * @version 1.0
 * @mail: 3148107006@qq.com
 * @date: 2021年04月19日 星期一 16时07分43秒
 * @brief:
 */

#include <iostream>
#include "TimeIntegratorFactory.h"


bool TimeIntegratorFactory::RegisterTimeIntegrator(const std::string &TimeIntegratorID, TimeIntegratorCreator createFn)
{
	return TimeIntegratorMap.insert(CallbackMap::value_type(TimeIntegratorID, createFn)).second;
}

bool TimeIntegratorFactory::UnregisterTimeIntegrator(const std::string &TimeIntegratorID)
{
	return TimeIntegratorMap.erase(TimeIntegratorID) == 1;
}


